home *** CD-ROM | disk | FTP | other *** search
INI File | 2006-09-13 | 6.9 KB | 230 lines |
- [SUBJECT]
- Description=Converts bewteen different units of area
- ImageIndex=-1
- Folder=Mathematics
-
-
-
- [BODY_TEXT]
- ;<!-- Cut-N-Paste JavaScript from ISN Toolbox
- ;Copyright 1996, Infohiway Server Network. Restricted use is hereby
- ;granted (both personal and commercial use OK so long as this code is
- ;not *directly* sold), providing this notice is buried somewhere deep
- ;in your HTML document. A link to http://www.infohiway.com is always
- ;appreciated, but is absolutely and positively not necessary. :-) -->
- ;
- ;<script language="JavaScript">
- ;
- ;<!-- Hide JavaScript from Java-Impaired Browsers
- ;
- ;function initArray() {
- ;
- ; this.length = initArray.arguments.length;
- ;
- ; for (var i = 0; i < this.length; i++) {
- ;
- ; this[i] = initArray.arguments[i];
- ;
- ; }
- ;
- ; }
- ;
- ;/* Please don't ask about this work-around. It works... We're sure arrays
- ;
- ; will be better supported soon. */
- ;
- ;var isn04 = new initArray("4b","5b","8b","8b");
- ;
- ;isn04[0] = "~01~11550~210.76~31.196~40.0395~50.002471~60.0009884~70.0002471~80.0000003861~9";
- ;
- ;isn04[1] = "~00.0006452~11~20.006944~30.0007716~40.00002551~50.000001594~60.0000006377~70.0000001594~82.291e-10~9";
- ;
- ;isn04[2] = "~00.09290~1144~21~30.1111~40.003673~50.0002296~60.00009183~70.00002296~83.587e-8~9";
- ;
- ;isn04[3] = "~00.8361~11296~29~31~40.03306~50.002066~60.0008264~70.0002066~83.228e-7~9";
- ;
- ;isn04[4] = "~025.29~139204~2272.25~330.25~41~50.0625~60.025~70.00625~89.766e-6~9";
- ;
- ;isn04[5] = "~0404.7~1627264~24356~3484~416~51~60.4~70.1~80.00015625~9";
- ;
- ;isn04[6] = "~01012~11568160~210890~31210~440~52.5~61~70.25~80.000390625~9";
- ;
- ;isn04[7] = "~04047~16272640~243560~34840~4160~510~64~71~80.0015625~9";
- ;
- ;isn04[8] = "~02589988~14013355318~227878400~33097600~4102400~56400~62560~7640~81~9";
- ;
- ;
- ;
- ;
- ;
- ;function areCon() {
- ;
- ; // First, get the variables checked by the user
- ;
- ; for (var i = 0; i < 9; i++) {
- ;
- ; if (document.isnform04.arei[i].checked) {
- ;
- ; arei = i;
- ;
- ; areinm = document.isnform04.arei[i].value;
- ;
- ; }
- ;
- ; }
- ;
- ; for (var i = 0; i < 9; i++) {
- ;
- ; if (document.isnform04.areo[i].checked) {
- ;
- ; areo = i;
- ;
- ; areonm = document.isnform04.areo[i].value;
- ;
- ; }
- ;
- ; }
- ;
- ; // Now grab the numeric input by user and parse to be sure numeric
- ;
- ; useri = document.isnform04.areinp.value;
- ;
- ; if (useri == 0) {
- ;
- ; useri = 1;
- ;
- ; document.isnform04.areinp.value = useri;
- ;
- ; }
- ;
- ; mulstr = isn04[arei];
- ;
- ; picker = "~" + areo;
- ;
- ; ps = mulstr.indexOf(picker);
- ;
- ; areo++;
- ;
- ; picker = "~" + areo;
- ;
- ; ps1 = mulstr.indexOf(picker);
- ;
- ; mulstr = mulstr.substring((ps + 2),ps1);
- ;
- ; ps = (useri * mulstr);
- ;
- ; picker = "";
- ;
- ; picker += ps;
- ;
- ; ps1 = picker.indexOf(".");
- ;
- ; if (ps1 > -1) {
- ;
- ; // Correct for binary/floating point conversion error
- ;
- ; ps = ps + .000001;
- ;
- ; picker = "";
- ;
- ; picker += ps;
- ;
- ; ps2 = picker.indexOf("e");
- ;
- ; if (ps2 < 0) {
- ;
- ; picker = picker.substring(0,(ps1 + 6));
- ;
- ; }
- ;
- ; if (ps2 == 0 || ps2 > 0) {
- ;
- ; ps3 = picker.indexOf("00000");
- ;
- ; if (ps3 > 0) {
- ;
- ; picker = picker.substring(0,ps3 + 1) + picker.substring(ps2,picker.length);
- ;
- ; }
- ;
- ; }
- ;
- ; }
- ;
- ; picker = useri + " " + areinm + " = " + picker + " " + areonm;
- ;
- ; document.isnform04.areout.value = picker;
- ;
- ; }
- ;
- ;// End Hiding -->
- ;
- ;
- ;
- ;</script>
- ;<form name="isnform04">
- ;<table border="1" width="486" summary="">
- ;
- ;<tr><td colspan="9" align="center"><font color="blue"><b>`Caption`</b></font></td></tr>
- ;
- ;<tr><td colspan="10" valign="top"><font size="1"><b>First, type the number you wish converted here: </b>
- ;
- ;<input type="text" name="areinp" size="30" value="" onChange="areCon();"><br><b>Then, click radio buttons for desired conversion:</font></B></td></tr>
- ;
- ;<tr><td align="center"><font color="red" size="1"><b>From:</b></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Meters<br><input type="radio" name="arei" value="Square Meters" checked onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Inches<br><input type="radio" name="arei" value="Square Inches" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Feet<br><input type="radio" name="arei" value="Square Feet" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Yards<br><input type="radio" name="arei" value="Square Yards" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Rods<br><input type="radio" name="arei" value="Square Rods" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Chains<br><input type="radio" name="arei" value="Square Chains" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Roods<br> <br><input type="radio" name="arei" value="Roods" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Acres<BR> <br><input type="radio" name="arei" value="Acres" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Miles<br><input type="radio" name="arei" value="Square Miles" onClick = ""></font></td></tr>
- ;
- ;<tr><td align="center"><font color="red" size="1"><b>To:</b></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Meters<br><input type="radio" name="areo" value="Square Meters" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Inches<BR><INPUT TYPE="radio" name="areo" value="square inches" checked onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Feet<br><input type="radio" name="areo" value="Square Feet" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Yards<br><input type="radio" name="areo" value="Square Yards" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Rods<br><input type="radio" name="areo" value="Square Rods" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Chains<br><input type="radio" name="areo" value="Square Chains" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Roods<br> <br><input type="radio" name="areo" value="Roods" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Acres<br> <br><input type="radio" name="areo" value="Acres" onClick = ""></font></td>
- ;
- ;<td align="center" valign="top"><font size="1">Square Miles<br><input type="radio" name="areo" value="Square Miles" onClick = ""></font></td></tr>
- ;
- ;<tr><td colspan="10" align="center" valign="top"><font size="1"><input type="button" value=" Click for Conversion " onClick="areCon();">
- ;<input type="reset" value=" Reset Values "><br><input type="text" name="areout" size="60" value="" onClick="areCon();">
- ;
- ;</font></td></tr>
- ;
- ;</table></form>
- ;
- ;<p>
- ;
- ;
-
- [`Caption`]
- Kind=S
- Value=Area Equivalents
-
-
-